<input type="hidden" class="tpl-form-input" id="menu-id" name="menu.id" value="#(menu.id??)">
<input type="hidden" class="tpl-form-input" id="menu-pid" name="menu.pid" value="#(menu.pid??)">
<div class="am-form-group">
    <label for="menu-name" class="am-u-sm-3 am-form-label">菜单名 <span class="tpl-form-line-small-title">name</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="menu-name" name="menu.name" value="#(menu.name??)" placeholder="请输入菜单名">
        <small>#(nameMsg)</small>
    </div>
</div>

#if(menu.pname)
<div class="am-form-group">
    <label for="menu-name" class="am-u-sm-3 am-form-label">上级 <span class="tpl-form-line-small-title">name</span></label>
    <div class="am-u-sm-9">
        #(menu.pname)
    </div>
</div>
#end

<div class="am-form-group">
    <label for="menu-mark" class="am-u-sm-3 am-form-label">标识 <span class="tpl-form-line-small-title">mark</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="menu-mark" name="menu.mark" value="#(menu.mark??)" placeholder="请输入标识">
        <small></small>
    </div>
</div>

<div class="am-form-group">
    <label for="menu-type" class="am-u-sm-3 am-form-label">菜单类型 <span class="tpl-form-line-small-title">type</span></label>
    <div class="am-u-sm-9">
        #if(menu.type || menu.type == 0)
            <input name="menu.type" type="hidden" class="tpl-form-input" value="#(menu.type)">
            #if(menu.type == 0)
            类别
            #elseif(menu.type == 1)
            目录
            #elseif(menu.type == 2)
            页面
            #else
            功能
            #end
        #else
        <select id="menu-type" name="menu.type" data-am-selected="{searchBox: 0}" style="display: none;">
            #if(!ptype || ptype == 0)
            <option value=1>类别</option>
            <option value=2>目录</option>
            <option value=3>页面</option>
            #elseif(ptype == 1)
            <option value=2>目录</option>
            <option value=3>页面</option>
            #elseif(ptype == 2)
            <option value=3>页面</option>
            #elseif(ptype == 3)
            <option value=4>功能</option>
            #end
        </select>
        #end
    </div>
</div>

<div class="am-form-group">
    <label for="menu-icon" class="am-u-sm-3 am-form-label">图标 <span class="tpl-form-line-small-title">icon</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="menu-icon" name="menu.icon" value="#(menu.icon??)" placeholder="请选择图标">
        <!--<link rel="stylesheet" href="/admin/common/Bootstrap/css/bootstrap.min.css"/>
        <link rel="stylesheet" href="/admin/common/FontAwesome/css/font-awesome.min.css">
        <link rel="stylesheet" href="/admin/common/BootstrapIconPicker/css/bootstrap-iconpicker.min.css"/>

        <script src="/admin/common/Bootstrap/js/bootstrap.min.js"></script>
        <script src="/admin/common/BootstrapIconPicker/js/iconset-fontawesome-4.3.0.min.js"></script>
        <script src="/admin/common/BootstrapIconPicker/js/bootstrap-iconpicker.js"></script>

        <button class="am-btn am-btn-primary" type="button" data-placement="right" data-iconset="fontawesome" id="menu-icon" name="menu.icon" role="iconpicker"></button>
        <script type="text/javascript">
            $(function () {
                $('#menu-icon').iconpicker({
                    cols: 7,
                    footer: true,
                    header: true,
                    rows: 5
                });
            });
        </script>-->
    </div>
</div>

<div class="am-form-group">
    <label for="menu-permission" class="am-u-sm-3 am-form-label">权限地址 <span class="tpl-form-line-small-title">permission</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="menu-permission" name="menu.permission" value="#(menu.permission??)" placeholder="请输入权限地址">
    </div>
</div>

<div class="am-form-group">
    <label for="menu-sort" class="am-u-sm-3 am-form-label">排序 <span class="tpl-form-line-small-title">sort</span></label>
    <div class="am-u-sm-9">
        <input type="number" class="tpl-form-input" id="menu-sort" name="menu.sort" value="#(menu.sort??)" placeholder="请输入排序">
    </div>
</div>

<div class="am-form-group">
    <div class="am-u-sm-9 am-u-sm-push-3">
        <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
    </div>
</div>